package com.yiyi.controller;

import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * User: YIYI
 * Date: 2021-08-10
 * Time: 14:49
 * Description:
 */

@RestController
public class HelloController {

    @RequestMapping("hello")
    //@CrossOrigin
    @PreAuthorize("hasAnyRole('ROLE_ADMIN')")
    public String hello() {
        return "hello";
    }
}